<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<import type="js" file="js.jquery" />
<import type="js" file="js.common" />
<import type="css" file="css.global" />
<import type="css" file="css.form" />
</head>
<body>
<div class="search">
<form action="apply_list" method="post" name="form1" onsubmit="return CheckForm();">
	<b>客户名称查询：</b>
	<input type="text" name="content" value="{$content}"><input type="submit" value="查询" class="submit" />
</form>
</div>
<div class="list">
<table class="stripe" cellspacing="0">
    <thead>
        <tr>
            <th width="50ox">序号</th>
            <th width="25%">设备类型</th>
            <th width="25%">客户名称</th>
            <th width="130px">测试地点</th>
            <th width="100px">归还时间</th>
            <th width="130px">操作</th>
        </tr>
    </thead>
 
    <tbody>
      <volist name="data" id="vo" empty="$empty">
        <tr>
            <td align="center">{$i}</td>
            <td>{$vo.dev_type|default="---"}</td>
            <td>{$vo.client_name|default="---"}</td>
            <td>{$vo.place|default="---"}</td>
            <td>{$vo.back_time|default="---"}</td>
            <td><if condition="$vo['status'] eq 0"><a href="javascript:void(0);" onclick="edit({$vo.id});" >编辑</a>  |  <a href="javascript:void(0);" onclick="del({$vo.id})">删除</a><else /><a href="javascript:void(0);" onclick="view({$vo.id});">查看</a></if></td>
        </tr>
      </volist>
    </tbody>
</table>
</div>
<div class="page">{$page}</div>
</body>
</html>
<script language="javascript">
$(document).ready(function(){  
	$(".stripe tr").mouseover(function(){    
	  $(this).addClass("over");}).mouseout(function(){   
			$(this).removeClass("over");}) 
  	$(".stripe tr:even").addClass("alt");
});   
function edit(id){
	window.location="__APP__/Device/edit?id="+id;
}
function del(id){
	if (confirm("真的要删除吗？")){
		$.get("__APP__/Device/delete?id="+id,function(result){
			alert(result);
			location.reload();
		});
	}else{
		return false;
	}
}

function view(id){
	window.location="__APP__/Device/view?id="+id;
}
function CheckForm(){
	var content = $("input[name='content']").val();
	if( content != "" && content.indexOf(" ") >= 0){
		$("input[name='content']").focus();
		$("input[name='content']").select();
		alert("客户名称不能含有空格！");return false;
	}
}
</script>  